package com.xyrl.project.common.csr.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xyrl.project.common.base.entity.BaseEntity;
import java.util.Date;

import com.xyrl.project.common.csr.enu.CsrUserType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


/**
* @className CustomerUser.java
* @company 重庆星纭融链科技公司
* @author 徐恩源
* @version 1.0
* @date 2019-12-30 15:45:14
* @Description 商户实体类
*/
@Data
@TableName("t_csr_user")
@ApiModel(value="csrUser对象", description="商户")
public class  CsrUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "手机号")
    @Length(min = 1, max =16, message = "手机号必须在{min}~{max}字符之间")
    private String mobile;

    @ApiModelProperty(value = "姓名")
    @Length(min = 1, max =24, message = "姓名必须在{min}~{max}字符之间")
    private String name;

    @ApiModelProperty(value = "商户用户类型")
    @NotNull
    private CsrUserType userType;

    @ApiModelProperty(value = "安全码")
    @Length(min = 1, max =32, message = "安全码必须在{min}~{max}字符之间")
    private String salt;

    @ApiModelProperty(value = "用户头像")
    @NotBlank(message = "用户头像不能为空")
    @Length(min = 1, max =255, message = "用户头像必须在{min}~{max}字符之间")
    private String head;

    @ApiModelProperty(value = "交易密码")
    @NotBlank(message = "交易密码不能为空")
    @Length(min = 1, max =32, message = "交易密码必须在{min}~{max}字符之间")
    private String tradePwd;

    @ApiModelProperty(value = "推送id")
    @NotBlank(message = "推送id不能为空")
    @Length(min = 1, max =50, message = "推送id必须在{min}~{max}字符之间")
    private String pushId;

    @ApiModelProperty(value = "授信额度")
    private BigDecimal creditPrice;

    @ApiModelProperty(value = "最后登录时间")
    private Date lastTime;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    @NotNull(message = "创建人不能为空")
    private Long createUserId;

    @ApiModelProperty(value = "数据版本")
    @NotNull(message = "数据版本不能为空")
    private Integer version;


}
